﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Mvc;
using Hangfire;

namespace PushManager.Web
{
    public class PushTestController : Controller
    {
        public void Signalr()
        {
            //循環12次,每隔5s添加一個任務,相當於1分鐘12次,每隔5s執行一次
            RecurringJob.AddOrUpdate(() => PushTask.SignalrPush.Send(), Cron.Minutely());
        }

        public void PushSharp()
        {
            RecurringJob.AddOrUpdate(() => PushTask.Push.Send(), Cron.Minutely());
        }
    }
}